package com.atguigu.structures;

import java.util.ArrayList;

public class GraphExample {
    public static void main(String[] args) {
        GraphNode A = new GraphNode(0);
        GraphNode B = new GraphNode(1);
        GraphNode C = new GraphNode(2);

        A.neighbours.add(B);
        B.neighbours.add(C);
        C.neighbours.add(A);

        // 拓扑排序
    }

    public static class GraphNode {
        public int value;
        public ArrayList<GraphNode> neighbours;

        public GraphNode(int value) {
            this.value = value;
            this.neighbours = new ArrayList<>();
        }
    }
}
